import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

// 动态处理器 
public class Danymic implements InvocationHandler {

    private IBuyHous buyHous;

    public Danymic(IBuyHous buyHous){
        this.buyHous = buyHous;
    }

    public Danymic(){
        
    }
    
    @Override
    public Object invoke(Object proxy, Method method, Object[] objects) throws Throwable {

      
        String name = method.getName();
        System.out.println(name + "方法执行之前......");
        Class<?> clazz = method.getDeclaringClass();
        System.out.println(clazz);
//        Object o = clazz.newInstance();   // 接口是不能创建对象的
//        Object result = method.invoke(o, objects);
        
        System.out.println("方法执行之后......");
        return null;
    }
}
